<%@page language="java" pageEncoding="UTF-8" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="js/jquery-3.2.1.min.js"></script>
    <script>
        //时钟ajax
        function bb(){
            $.ajax({
                type:'post',
                url: 'timer',
                cache: false,
                dataType:'text',
                success:function(b){
                    $(".tt").html(b);
                }
            })
        }

        $(function(){
            bb();
            setInterval(bb,1000);
        })


        //ajax获取数据
        $(function () {
            $.ajax({
                type:'post',
                url: 'fastjson',
                cache: false,
                dataType:'json',
                success:function(b){
                    $("span").html(b.uname);
                }
            })
        })
    </script>

    <title>Document</title>
</head>
<body>


<h3 class="tt"></h3>
<h3 class="ttt">
    用户名:<span></span>

</h3>
<form action="/sss" method="post">
    用户名：<input type="text" name="name" >
    <input type="submit" value="提交">
</form>

${user}ii

<hr>

<h3>单文件上传</h3>
<form action="/uploads.do" method="post" enctype="multipart/form-data">
    <input type="text" name="name"><br>
    <input type="file" name="face"><br>
    <input type="submit" value="提交">
</form>

<h3>多文件上传1</h3>
<form action="/uploads" method="post" enctype="multipart/form-data">
    <input type="text" name="name"><br>
    <input type="file" name="head" multiple><br>
    <input type="submit" value="提交">

</form>


<h3>多文件上传2</h3>
<form action="/uploads.action" method="post" enctype="multipart/form-data">
    <input type="text" name="name"><br>
    file1:<input type="file" name="fs"><br>
    file2:<input type="file" name="fs"><br>
    file3:<input type="file" name="fs"><br>
    file4:<input type="file" name="fs"><br>
    file5:<input type="file" name="fs"><br>
    <input type="submit" value="提交">
</form>
</body>
</html>
